package com.coc.util;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;
import java.util.List;
import java.util.Random;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.coc.bean.CcBuilding;
import com.coc.bean.CcMap;
import com.coc.bean.Hall;
import com.coc.bean.Tree;
import com.coc.bean.def.Trap;
import com.schooner.MemCached.MemcachedItem;

public class Test {
	public static void test() throws Exception{
		System.out.println(System.currentTimeMillis());
		
		System.out.println(System.currentTimeMillis());
		
	}
	public static void main(String[] arg) {
		String str = "0;0;;;;1";
		String[] strs = str.split(";");
		CcMap cm  = (CcMap)MemCacheUtil.getObject("cm_2");

		
//		
//		CcMap cm = new CcMap();
//		Hall hall  = new Hall();
//		hall.setLv(1);
//		cm.setHall(hall);
//		CcBuilding tmp = cm.getHall();
//		tmp.setLv(3);
//		MemCacheUtil.setObject("testbean",  cm);
		
	//	MemCacheUtil.setObject("test","test11");
	//	MemCacheUtil.setObject("map_act_6","test1111");
	//	MemCacheUtil.setObject("map_act_4", 123456L);
//		System.out.println(MemCacheUtil.getObject("testbean"));
		MemcachedItem mii = MemCacheUtil.getsObject("map_act_4");
		MemcachedItem mi = MemCacheUtil.getsObject("test");
	//	System.out.println(System.currentTimeMillis());
		//12865417141841674
		//12865431233404197
	//	MemCacheUtil.setObject("test333","test333",new Date(System.currentTimeMillis()+10000L));
		// cas ok   =1
		// cas falie=0
		// 
		System.out.println(mi.getValue());
		System.out.println(MemCacheUtil.getObject("map_act_3"));
	//	MemCacheUtil.delValue("test");
	//	System.out.println(MemCacheUtil.casObject("test", "test22", mi.getCasUnique()));
//		JSONArray ja = JSONArray.fromObject("[{t:1469400255523,b:\"LABT|0\",a:\"move\",x:3,y:7},{t:1469400235386,b:\"BARK|2\",a:\"boost_upgrade\"}]");
//		for(int i=0;i<ja.size();i++){
//			JSONObject jo = (JSONObject)ja.get(i);
//			System.out.println(jo.get("t"));
//			System.out.println(jo.get("s"));
//		}
		
//		Hashtable<String,String> ht = new Hashtable<String,String>();
//		ht.put("123", "123");
//		ht.put("223", "223");
//		ht.put("123", "321");
//		ht.put("333", "333");
//		ht.put("444", "444");
//		MemCacheUtil.addValue("cm_xxx","123" );
//		for(int i=1;i<100;i++){
//			MemCacheUtil.addValue("cm_" + i);
//		}
	}
}

/*
 * Location: C:\Work\WorkSpace\classes\ Qualified Name: com.coc.util.Test
 * JD-Core Version: 0.6.2
 */